package com.wpen.unit.component;

import java.util.Locale;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.MessageSource;
import org.springframework.stereotype.Component;

/**
 * 
 * @author pg
 *
 */
@Component
public class I18nMessageManager {

    @Autowired
    private MessageSource messageSource;

    public String getMessage(String code, Object[] args, Locale locale) throws Exception {
        return messageSource.getMessage(code, args, locale);
    }
}
